#ifndef __MP4_MUXER_H__
#define  __MP4_MUXER_H__

#include "mp4v2/mp4v2.h"
#include "my_type.h"
#include <android/log.h>
#define LOGE(...) __android_log_print(ANDROID_LOG_ERROR, "MP4V2", __VA_ARGS__)

// NALU单元
typedef struct _MP4ENC_NaluUnit {
  int frameType;
  int frameLen;
  unsigned char *pframeBuf;
} MP4ENC_NaluUnit;

// 媒体帧类型
typedef enum MEDIA_FRAME_TYPE {
  MEDIA_FRAME_UNVALID = 0,
  MEDIA_FRAME_VIDEO = 1, //  视频
  MEDIA_FRAME_AUDIO = 2  // 音频
} MEDIA_FRAME_TYPE_E;

int fileCreate(char *pFileName, int width, int height, int frameRate);
int fileWrite(int frameType, uint8_t* pframeBuf, int frameLen);
int fileClose(void);

#endif
